package com.zengqh.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(name = "product-service", path = "/product")
public interface ProductFeignService {

    //要主要的就是feign接口的参数要和对应controller接口一致，最好就是直接复制过来
    @RequestMapping("/get/{id}")
    public String get(@PathVariable("id") Integer id);

    @GetMapping("/getUnitPrice/{productNo}")
    Integer getUnitPrice(@PathVariable("productNo") String productNo);
}
